﻿using Microsoft.Extensions.Hosting;

using zijian666.WorkScheduler;

class MyTaskService(IWorkService? work = null) : IHostedService
{
    Task IHostedService.StartAsync(CancellationToken cancellationToken)
    {
        return work.Start(cancellationToken);
    }

    Task IHostedService.StopAsync(CancellationToken cancellationToken)
    {
        return work.Stop(cancellationToken);
    }
}
